html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
}

* {
  user-select: none;
  -webkit-user-drag: none;
}

#app {
  display: flex;
  flex-flow: column;
  overflow: hidden;
}

#main {
  flex: auto;
  display: flex;
  flex-flow: row nowrap;
  overflow: hidden;
}

#tags {
  flex-shrink: 0;
  position: relative;
  width: 200px;
  min-width: 150px;
  max-width: 50%;
  background-color: #f0f0f0;
  overflow: hidden;
  display: flex;
  flex-flow: column;
  border: 1px solid #000;
  border-left: none;
  font-size: 12px;
  z-index: 101;
}
#tags-hover {
  display: none;
  background-color: rgba(0, 0, 0, 0.0001);
  width: 20px;
  z-index: 100;
  bottom: 20px;
}
.fullscreen #tags {
  display: none;
  bottom: 0;
}
.fullscreen #tags.show {
  display: flex !important;
}
.fullscreen :is(#tags, #tags-hover) {
  position: absolute;
  left: 0;
  top: 0;
}
.fullscreen #tags-hover {
  display: block;
}
.fullscreen #tags-close {
  display: none;
}

.tags-tab {
  padding: 0 8px;
  padding-top: 2px;
  margin-bottom: -5px;
  z-index: 10;
  cursor: pointer;
}
.type-tags #tags-tags,
.type-chapters #tags-chapters {
  background: #fff;
  border: 1px solid;
  border-bottom: none;
}
.type-chapters :is(#tags-toolbar, [data-type="edit"], [data-type="delete"]) {
  display: none !important;
}
.type-chapters #tags-list {
  border-bottom: none;
}

#tags-list {
  flex: auto;
  overflow: auto;
  background-color: #fff;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 0;
}
.tag-item {
  display: flex;
  flex-flow: row nowrap;
}
.tag-item:hover {
  background-color: #f0f0f0;
}
.tag-info {
  flex: auto;
  overflow: hidden;
  padding: 5px;
}
.tag-info {
  font-size: 12px;
}
.tag-page {
  color: #e6a23c;
}
.tag-pad {
  color: #fff;
}
.tag-item:hover .tag-pad {
  color: #f0f0f0;
}
.tag-comment {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.no-comment {
  font-style: italic;
  opacity: 0.5;
}
.tag-btn {
  display: none;
  align-items: center;
  padding: 0 5px;
}
.tag-item:hover .tag-btn {
  display: flex;
}
.tag-btn:hover {
  background-color: #ccc;
}
.tag-btn > span {
  pointer-events: none;
}

#tags-resize {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background-color: rgba(0, 0, 0, 0.0001);
  cursor: w-resize;
}
#tags-resize:hover {
  background-color: rgb(103, 194, 58, 0.8);
}
#tags-resize:active {
  background-color: rgb(245, 108, 108, 0.8);
}

#images-container {
  flex: auto;
  overflow: hidden;
}
/* #images-container::-webkit-scrollbar {
  display: none;
} */
#images {
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: flex-start;
}
img {
  display: block;
  position: relative;
  image-rendering: -webkit-optimize-contrast;
}
.is-alt img {
  outline: dashed 1px #f00;
}
/* img:hover {
  opacity: 0.8;
} */

#toolbar {
  width: 100%;
  height: 20px;
  flex-shrink: 0;
  background-color: #f0f0f0;
  display: flex;
  flex: row nowrap;
  line-height: 20px;
  position: relative;
}
.no-image #toolbar {
  pointer-events: none;
}
#canvas {
  margin: 0 10px;
}
#handler,
#handler-preview {
  position: absolute;
  width: 0;
  height: 100%;
  border-left: solid 2px #f00;
  pointer-events: none;
}
#handler-preview {
  opacity: 0.2;
  display: none;
}
.no-handler #handler {
  display: none;
}
.no-handler #page {
  opacity: 0.5;
  pointer-events: none;
}

#tooltip {
  display: none;
  position: fixed;
  bottom: 22px;
  background-color: #ffffe1;
  border: solid 1px #000;
  padding: 2px 4px;
  z-index: 999;
  text-align: center;
}
.tip #tooltip,
.tip #handler-preview {
  display: block;
}

#zoomtool,
#pagination {
  display: flex;
  flex-flow: row;
}
#zoomtool {
  width: 80px;
}
#pagination {
  width: 160px;
}
#othertool {
  margin-left: 10px;
  width: 40px;
}
#zoom,
#page {
  flex: auto;
  text-align: center;
  cursor: text;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
#zoom-input,
#page-input {
  display: none;
  flex: auto;
  text-align: center;
  min-width: 0;
  outline: none;
}
#zoomtool.input #zoom,
#pagination.input #page {
  display: none;
}
#zoomtool.input #zoom-input,
#pagination.input #page-input {
  display: block;
}

.iconfont:hover {
  background-color: #ccc;
}
.iconfont.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.fullscreen #toolbar {
  position: fixed;
  left: 0;
  bottom: 0;
  opacity: 0.0001;
}
.fullscreen #toolbar:hover,
.fullscreen #toolbar.handler-moving {
  opacity: 1;
}
#btn-leavefullscreen {
  display: none;
}
.fullscreen #btn-fullscreen {
  display: none;
}
.fullscreen #btn-leavefullscreen {
  display: initial;
}

.dialog-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}
.dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 20px);
  background-color: #fff;
  display: flex;
  flex-flow: column;
  overflow: hidden;
  font-size: 14px;
  border: 1px solid #000;
}
.dialog-header {
  flex-shrink: 0;
  padding: 4px;
  display: flex;
  flex-flow: row nowrap;
  background-color: #f0f0f0;
  line-height: 20px;
  & .icon-close {
    margin-left: auto;
  }
}
/* .dialog-title {
  font-weight: bold;
} */
.dialog-body {
  padding: 10px;
  flex: auto;
  overflow: auto;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
}
.dialog-footer {
  flex-shrink: 0;
  padding: 4px;
  text-align: right;
  background-color: #f0f0f0;
  line-height: 20px;
}

.dialog-body tr > td:first-child {
  text-align: right;
  padding-right: 10px;
}

#fs-title {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  z-index: 100;
  background-color: #000;
  color: #ccc;
  padding: 10px;
  opacity: 0.0001;
  pointer-events: none;
}
.fullscreen #fs-title {
  pointer-events: all;
  &:hover {
    opacity: 1;
  }
}
#fs-page,
#fs-time {
  display: none;
  position: fixed;
  top: 0;
  z-index: 99;
  pointer-events: none;
  text-align: right;
  padding: 10px;
  background-color: #000;
  color: #333;
}
#fs-page {
  left: 0;
}
#fs-time {
  right: 0;
}
.fullscreen {
  &.fs-page #fs-page {
    display: block;
  }
  &.fs-time #fs-time {
    display: block;
  }
}

.nodata {
  font-size: 12px;
  padding: 20px;
  pointer-events: none;
  font-style: italic;
  opacity: 0.5;
  text-align: center;
}

.hide {
  display: none !important;
}
